package com.dragon.modules.yuegou.model.system;

import com.dragon.modules.yuegou.entity.system.DataAccessEntity;
import com.dragon.modules.yuegou.enums.system.DataAccessOwnerType;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;

/**
 * 数据权限模型类
 * 
 * @author pbuilder generated
 * @date 2019-03-15 15:37:59
 * @company sgy
 * @version 2.0
 * @see Length 长度限制
 * @see NotNull 对象非空
 * @see NotEmpty 字符串、集合、表、数组非空
 */
public class DataAccess extends DataAccessEntity {

	/**
	 * 构造一个空数据权限模型对象
	 */
	public DataAccess(){
		super();
	}
	
	/**
	 * 依据实体对象的信息构造一个数据权限模型对象
	 * 
	 * @param entity 实体对象
	 */
	public DataAccess(DataAccessEntity entity){
		super(entity);
	}

	/**
	 * 依据其它对象的信息构造一个数据权限模型对象
	 * 
	 * @param other 其它对象
	 */
	public DataAccess(DataAccess other){
		super(other);
	}


	@Override
	public String getId() {
    	return id;
    }

    /**
	 * 设置
	 * 
	 * @param id 
	 * @return 当前对象
	 */
    public DataAccess id(String id) {
    	this.id = id;
    	return this;
    }

	@Override
	public String getUserId() {
    	return userId;
    }

    /**
	 * 设置
	 * 
	 * @param userId 
	 * @return 当前对象
	 */
    public DataAccess userId(String userId) {
    	this.userId = userId;
    	return this;
    }

	@Override
	public DataAccessOwnerType getOwnerType() {
    	return ownerType;
    }

    /**
	 * 设置[枚举]角色类型：0-平台-PLATFORM、1-集团-GROUP、2-商圈-BUSINESS_DISTRICT
	 * 
	 * @param ownerType [枚举]角色类型：0-平台-PLATFORM、1-集团-GROUP、2-商圈-BUSINESS_DISTRICT
	 * @return 当前对象
	 */
    public DataAccess ownerType(DataAccessOwnerType ownerType) {
    	this.ownerType = ownerType;
    	return this;
    }

	@Override
	public String getBusdId() {
    	return busdId;
    }

    /**
	 * 设置商圈id
	 * 
	 * @param busdId 商圈id
	 * @return 当前对象
	 */
    public DataAccess busdId(String busdId) {
    	this.busdId = busdId;
    	return this;
    }

	@Override
	public String getGroupId() {
    	return groupId;
    }

    /**
	 * 设置集团id
	 * 
	 * @param groupId 集团id
	 * @return 当前对象
	 */
    public DataAccess groupId(String groupId) {
    	this.groupId = groupId;
    	return this;
    }

	@Override
	public LocalDateTime getCreatedTime() {
    	return createdTime;
    }

    /**
	 * 设置
	 * 
	 * @param createdTime 
	 * @return 当前对象
	 */
    public DataAccess createdTime(LocalDateTime createdTime) {
    	this.createdTime = createdTime;
    	return this;
    }

	@Override
	public String getCreatedBy() {
    	return createdBy;
    }

    /**
	 * 设置
	 * 
	 * @param createdBy 
	 * @return 当前对象
	 */
    public DataAccess createdBy(String createdBy) {
    	this.createdBy = createdBy;
    	return this;
    }
}
